Next | Prev | Up | Top | Contents | Index

Important Header Files

The header files that are frequently needed in device driver source modules are summarized in Table 9-2.

Header Files Often Used in Device Drivers
Header FileReason for Including
sys/buf.h The buf_t structure and related constants and functions (included by sys/ddi.h).
sys/cmn_err.h The cmn_err() function.
sys/conf.h The constants used in the pfxdevflags global.
sys/ddi.h Many kernel functions declared. Also includes sys/types.h, sys/uio.h, and sys/buf.h.
sys/debug.h Defines the ASSERT macro and others.
sys/dmamap.h Data types and kernel functions related to DMA mapping.
sys/edt.h Declares the edt_t type passed to pfxedtinit().
sys/eisa.h EISA-bus hardware constants and EISA kernel functions.
sys/errno.h Names for all system error codes.
sys/file.h Names for file mode flags passed to driver entry points.
sys/immu.h Types and macros used to manage virtual memory and some kernel functions.
sys/kmem.h Constants like KM_SLEEP used with some kernel functions.
sys/ksynch.h Functions used for sleep-locks.
sys/log.h Types and functions for using the system log.
sys/major.h Names for assigned major device numbers.
sys/map.h Types and functions used for suballocation using rmalloc().
sys/mman.h Constants and flags used with mmap() and the pfxmmap() entry point.
sys/param.h Constants like PZERO used with some kernel functions.
sys/pio.h VME PIO functions.
sys/poll.h Types and functions for pollhead allocation and poll callback.
sys/scsi.h Types and functions used to call the inner SCSI driver.
sys/sema.h Types and functions related to semaphores, mutex locks, and basic locks.
sys/stream.h STREAMS standard functions and data types.
sys/strmp.h STREAMS multiprocessor functions.
sys/sysmacros.h Macros for conversion between bytes and pages, and similar values.
sys/systm.h Kernel functions related to system operations.
sys/types.h Common data types and types of system objects (included by sys/ddi.h).
sys/uio.h The uio_t structure and related functions (included by sys/ddi.h).
sys/vmereg.h VME bus hardware constants and VME-related functions.



Next | Prev | Up | Top | Contents | Index